package com.kgc.ssm.entity.dto;

/**
 * 统一返回结果集
 * @param <T>
 */
// @Data
// @AllArgsConstructor
// @NoArgsConstructor
public class Result<T> {
    private String msg;//消息
    private Integer code;//编码
    private T data;//数据
    private Long total;//总记录数

    public Result(String msg, Integer code, T data) {
        this.msg = msg;
        this.code = code;
        this.data = data;
    }

    public Result(String msg, Integer code, T data, Long total) {
        this.msg = msg;
        this.code = code;
        this.data = data;
        this.total = total;
    }

    public Long getTotal() {
        return total;
    }

    public void setTotal(Long total) {
        this.total = total;
    }

    public Result() {
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public Object getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
